package com.google.sydym6.logic.database.data;

import com.google.sydym6.R;


public class RadioData implements IRadioData{
	private int cover = -1;
	private String title;
	private String url;
	private boolean favourite;
	private boolean talk;
	private long id;

	@Override
	public String getTitle() {
		return title;
	}

	@Override
	public String getUrl() {
		return url;
	}

	@Override
	public String getGenre() {
		return null;
	}

	@Override
	public int getCover() {
		if (cover == -1) {
			return R.drawable.icon;
		} else {
			return cover;
		}
	}

	@Override
	public String getCountry() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getCity() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getLanguage() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public boolean isFavourite() {
		return favourite;
	}

	@Override
	public boolean isTalk() {
		return talk;
	}

	@Override
	public void setTitle(String title) {
		this.title = title;
	}

	@Override
	public void setUrl(String url) {
		this.url = url;
	}

	@Override
	public void setGenre(String genre) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void setCountry(String country) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void setCity(String city) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void setLanguage(String language) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void setFavourite(boolean favourite) {
		this.favourite = favourite;
	}

	@Override
	public void setTalk(boolean talk) {
		this.talk = talk;
	}

	@Override
	public long getId() {
		return id;
	}

	@Override
	public void setId(long id) {
		this.id = id;
	}

	@Override
	public int hashCode() {
		return (int) id;
	}
	
	@Override
	public boolean equals(Object o) {
		if (o != null) {
			if (o instanceof IRadioData) {
				IRadioData oData = (IRadioData) o;
				return this.id == oData.getId();
			}
		}
		return false;
	}

	@Override
	public void setCover(int cover) {
		this.cover = cover;
	}
}
